package com.trg.designmodel.adapter.classAdapter;

/**
 * @ClassName: VoltageAdapter
 * @Description: 适配器，将220v的电压转换成5V
 * @Author: tangrg
 * @Date: 2021/7/6 10:25
 * @Version: 1.0
 * @Return:
 **/
public class VoltageAdapter extends Voltage220V implements Voltage5V {

    @Override
    public int outPut5V() {
        int src = outPut220V();
        int dest = src / 44;
        System.out.println("适配器中将源电压" + src + "V,转换成：" + dest+"V");
        return dest;
    }
}
